home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
boot
/
czesc_2
/
magicword1.1
/
magicword.doc
< prev
next >
Wrap
Text File
|
1994-06-25
|
11KB
|
205 lines
Documentation for MagicWord 1.1
-------------------------------
(c) 1992/93/94
Author: Urs Fleisch
Leimatstr. 38
CH-9000 St. Gallen
E-mail: ufleisch@stud.ee.ethz.ch
This program is PUBLIC DOMAIN, and may be freely distributed, however
always together with this documentation!
V1.1: With OS 2.0: MagicWord runs as a Commodity, supports ToolTypes and
Workbench-Arguments, Application-Window and writes icons.
MagicWord is a universal utility for word replacement and macros. Other
than special solutions in editors and wordprocessors, MagicWord works with
nearly every wordprocessor, editor and any other utility. Instead of
recording macros for every application, it is easier to record the macros
once with MagicWord for you'll be able to use them with future applications
too. The use of MagicWord is only limited by the ideas of the user.
This versatility can be used especially by replacing words. So you can let
MagicWord type your address simply by typing \adr in any application.
MagicWord can also be used as a little data base because you get access to
information by typing keywords. The access is done rather quick by
hashing.
You can start MagicWord from Shell or Workbench. From Shell you can
provide MagicWord with the name of a macro file, which will be loaded
automatically (Kickstart 1.3). From Workbench, MagicWord can also be
started together with icons of MagicWord-files or by starting a
MagicWord-file (OS 2.0). MagicWord doesn't need any library to run, but it
is able to use the ARP and ASL-Requesters. So arp.library is recommended
for Kickstart 1.3, asl.library for Kickstart 2.0 and 3.0.
From OS 2.0, MagicWord runs as a Commodity, i.e. you can configure the
program with ToolTypes, MagicWord can run silent in background and opens
its window when the HotKey has been typed. MagicWord provides the usual
Commodity-ToolTypes: Run as a commodity, the MagicWord-window only appears
if there's a ToolType CX_POPUP=YES set. Otherwise nothing happens on the
screen after starting the program. The program is now waiting for the
HotKey to be pressed. The default HotKey is "lalt control m". Pressing
this key combination activates MagicWord and the window will appear.
Closing the window doesn't kill MagicWord in memory, it still waits for the
HotKey until you kill it by choosing the menu "Project/Quit", by starting
it again or by killing it from Commodities-Exchange.
The HotKey and the Commodity's priority can be set by the ToolTypes
CX_POPKEY and CX_PRIORITY. The default selection is "CX_POPKEY=lalt
control m" and "CX_PRIORITY=0". You can assign any
Commodities-HotKey-string to CX_POPKEY, e.g. shift, alt, caps, control,
lshift, rshift, lalt, ralt, lcommand, rcommand and so forth. The active
HotKey is diplayed in the titlebar of the MagicWord window. CX_PRIORITY
can reach from -128 to 127. By setting CX_POPUP=YES, the window pops up
after starting MagicWord. The default value is CX_POPUP=NO. Another
ToolType is "FILE=filename", where filename is the name of a macro file,
which will be loaded at every start of MagicWord.
When started with invalid ToolTypes, MagicWord makes use of the default
settings. You can also deliver the ToolTypes to PutChar when starting from
CLI or a script like s:user-startup, e.g. 'Run >NIL: MagicWord
CX_POPKEY="control f10" CX_PRIORITY=1 FILE=defs.mw'. Here, CX_POPUP works
as a switch, so don't write CX_POPUP=YES, but only CX_POPUP to let the
window appear when the program is started.
MagicWord opens a window with half height of the actual default public
screen. A cursor indicates that you can edit in this window. The program
offers the following menu items:
Project/Open: Load a macro file
Project/Save As: Store the macros in memory
Project/Hide: Hide window, when run as a commodity.
Project/Quit: Quit program
Macros/New: Record a new macro
Macros/Delete: Delete an existing macro
Macros/Delete All: Delete all macros in memory
Macros/Show: Show all macros in memory
Here comes a more detailed description of the menu functions:
Macros/New: This function may be used first. It enables you to record
keypresses for a new macro. First it requests the name of the macro. This
name can contain letters, numbers and symbols, but no spaces or backslash
"\" for this character marks the begin of a macro name. The program won't
distinguish between upper and lower case. The macro name can be deleted by
typing Backspace or Del, input is finished by typing Return or Enter. From
now on, MagicWord records your keypresses until you select the menu
Record/finished. Now the macro is stored in memory and may be used by
typing a backslash "\" followed by the defined macro name.
Example: Select Macros/New, the message "Input new word!" will appear.
Now we type "adr" followed by Return. Now the program tells you that it is
recording all keypresses. You can type your text in any application, e.g.
in the wordprocessor to use this text with. So we change to our
application an type our address: "Hermann User<RETURN>Bitstreet
256<RETURN>1024 Bytetown<RETURN>. Now we return to MagicWord and select
the menu Record/finished, MagicWord confirms that it has stopped recording
keypresses. You can also type the text to record in the MagicWord-window
which offers you a simple editor.
A macro can contain 2000 keypresses. Be aware that the typing of the
Backspace or Delete-Key won't edit the macro data. The keypress will be
recorded and later reproduced like every other key.
Now we type "\adr" in any application or in MagicWord, and \adr is being
deleted and replaced by the recorded text. Be sure that you typed in the
macro name correctly, or you've got to retype the whole text (with
preceding backslash "\"!). Finish by typing Space or Return. It is
important that you start the macro name with a backslash, so MagicWord
recognizes the macro without checking every word and slowing down your
machine.
Macros are stored in memory dynamically. MagicWord compares every word
which starts with a backslash with the macros in memory by calculating the
position by hashing (just like the AmigaDOS file system). So access should
be pretty quick. The number of macros isn't limited, so you could fill all
RAM with macros.
Macros/Delete: Deletes a macro from memory. You've got to type in the
macro name. Notice that memory won't be freed until you select
"Macros/Delete all" or quit the program.
Macros/Delete All: This function deletes all macros in memory and frees
the used memory.
Macros/Show: Prints out all macro names in order of their appearance in
the hash table. The associated text can be displayed by typing the macro
name with preceding backslash.
Project/Save As: By choosing this function you can save all macros in
memory to disk. While saving, MagicWord prints out the name of the macro
currently saved. If available, the filename can be chosen using the ARP-
or ASL-Filerequester. Otherwise, you'll have to put up with a simple
requester.
With OS 2.0, MagicWord writes its files with icons.
Project/Open: Allows you to load a MagicWord file. Again, you may find an
ARP- or ASL-Requester and the names of the loaded macros are being
displayed. The macros from the chosen file are loaded to the ones already
in memory. Existing macros with the same name will be overwritten. This
function is also invoked when MagicWord has been started with a filename as
an argument (Kickstart 1.3) or with the FILE-ToolType (OS 2.0).
From OS 2.0, the MagicWord window is an application window. You can load a
file by dropping its icon over the MagicWord window.
Project/Hide: (from OS 2.0) By choosing this menu or closing the window,
the MagicWord window disappears and it will appear when the HotKey is
typed. Then MagicWord runs in the background.
Project/Quit: You can leave the program by selecting this menu item. No
more macros will be available to other applications.
That's all. Now I want to add some hints.
When you use MagicWord to replace words, nearly every application (DTP,
wordprocessors, editors...) can take advantage from its word replacement
faculty. From the many tested programs, only "Beckertext I" and "SuperED
C" don't work with MagicWord. The problem may be their key processing over
Intuition, which remembers only four keypresses. This limits also the
recording of short cut keys to select menu functions from macros. If an
application uses it's own menu keyboard handling (e.g. WordPerfect),
there's no problem.
Because you can move and click the mouse by keypresses, MagicWord can also
guide the mouse. But you must look out for some things:
* The mouse pointer can be moved by holding an Amiga key and pressing the
cursor keys. By holding down a cursor key, the pointer moves quickly,
single keypresses move it with little steps. If you hold down a shift key,
the pointer takes larger steps.
MagicWord generates only single keypresses. You should only (even to
simulate the right mouse button) use the left Amiga key (lAmiga), for the
right one generates repeated keypresses. To move the pointer faster, you
may hold down shift.
Before moving the mouse pointer, it should be positioned. E.g. you can
move it with the mouse to the lower right corner; while recording, you can
move it to the upper left corner by pressing lAmiga-Shift-Left and
lAmiga-Shift-Up. So you can be sure that the pointer will get to the upper
left corner from every position. Now you can move the pointer to the
desired position.
=> Move pointer: Place pointer and move it with lAmiga-Shift-Cursor keys
or lAmiga-Cursor keys with single keypresses.
* To simulate the left mouse button, it's not sufficient to press
lAmiga-lAlt for both of them are qualifier keys. In addition, you've got
to press a normal key without function, e.g. F1. To simulate a double
clicking, you should press a normal key alone between the mouse clicks.
=> left mouse button: press lAlt-lAmiga-F1.
double click: press lAlt-lAmiga-F1, F1, lAlt-lAmiga-F1.
* To select a menu, you may want to simulate the right mouse button. Move
the pointer and hold down the right Alt key. When you're over the menu
item, release all keys. Again: record single keypresses, use shift for
fast movement.
=> Select menu: move pointer with lAmiga-rAlt-Cursor keys to the menu
item, then release the keys.
That's for the mouse simulation. Now other hints:
* In the Shell, a macro may replace a batch file. Simply record some often
used commands.
* You don't need an editor to invoke a macro. You may also type blindly on
the Workbench screen.
* You can get often used addresses or your own letterhead simply by typing
one name.
* You can record phrases like Hello, Yours sincerly, Greetings...
* Programmers may record frames for their programmes, titles, comments...